﻿@{
    Layout = "../Shared/_Layout.cshtml";
}
<div data-day-photo="true" data-number-day="@ViewBag.NumberDay">
    <!-- ko if: Photo() != null -->
    <!-- ko template: {name:'photos-template', data: Photo(), afterRender: afterRender} -->
    <!-- /ko -->
    @if (User.Identity.IsAuthenticated && User.Identity.Name == "admin")
    {
        <!-- ko ifnot: enabledEdit() -->
        <a href="" data-bind="click: enableEdit">Редактировать описание</a>
        <!-- /ko -->
        <!-- ko if: enabledEdit() -->
        <a href="" data-bind="click: save">Сохранить описание</a>
        @:&nbsp;
        <a href="" data-bind="click: enableEdit">Отмена</a>
        <!-- /ko -->
    }
    <!-- /ko -->
    <div class="row">
        <div class="pull-right" id="yashare" data-yasharel10n="ru">
        </div>
        <div class="pull-right keyboard-nav-description">
            <label>
                Навигация с клавиатуры
                <span class="button" title="Стрелка влево">
                    <span class="glyphicon glyphicon-arrow-left"></span>
                </span>
                <span class="button" title="Стрелка вправо">
                    <span class="glyphicon glyphicon-arrow-right"></span>
                </span>
            </label>
        </div>
    </div>
    <hr />
    <div class="row">
        <div id="vk_comments"></div>
    </div>
</div>
@{
    Html.RenderPartial("Ko/PhotoT");
}
@section scripts
{
    <script type="text/javascript">
        if (VK != undefined) {
            VK.Widgets.Comments("vk_comments", { limit: 5, width: "540", attach: "*" });
        }
    </script>
}
